﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TMIS.DAL
{
    public class ProfessionTitle
    {
        private Model.ThesisDB db = new Model.ThesisDB();
        /// <summary>
        /// 获取教师教师
        /// </summary>
        /// <returns></returns>
        public string[] Get()
        {
            string[] education = (from e in db.ProfessionTitle
                                  select e.Title).ToArray();
            return education;
        }
        /// <summary>
        /// 获取职称对应的ID号
        /// </summary>
        /// <param name="professiontitle"></param>
        /// <returns></returns>
        public Guid Get(string professiontitle)
        {
            Guid id = (from e in db.ProfessionTitle
                       where e.Title == professiontitle
                       select e.ID).FirstOrDefault();
            return id;
        }
    }
}
